package com.zzyl.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzyl.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
public class Reservation extends BaseEntity {
    /**
     * 预约人姓名
     */
    private String name;

    /**
     * 预约人手机号
     */
    private String mobile;

    /**
     * 预约时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime time;

    /**
     * 探访人
     */
    private String visitor;

    /**
     * 预约类型，0：参观预约，1：探访预约
     */
    private Integer type;

    /**
     * 预约状态，0：待报道，1：已完成，2：取消，3：过期
     */
    private Integer status;

    // 无参构造器
    public Reservation() {
        this.status = 0; // 设置默认值
    }

    // 全参数构造器
    public Reservation(String name, String mobile, LocalDateTime time, String visitor, Integer type, LocalDateTime createTime, LocalDateTime updateTime, Long createBy, Long updateBy, String remark) {
        this.name = name;
        this.mobile = mobile;
        this.time = time;
        this.visitor = visitor;
        this.type = type;
        this.status = 0; // 设置默认值
    }
}
